package com.example.login.mapper;

import com.example.login.domain.po.Employee;
import com.example.login.domain.po.User;
import org.apache.ibatis.annotations.Select;

public interface AuthMapper {

    /**
     * 根据手机号查询员工
     * @param phone
     * @return
     */
    @Select("select * from employee where phone = #{phone}")
    Employee selectEmployeeByPhone(String phone);


    /**
     * 注册员工
     * @param employee
     */
    void register(Employee employee);

    /**
     * 根据openid查询员工
     * @param openid
     * @return
     */
    @Select("select * from users where openid = #{openid}")
    User getByOpenid(String openid);

    void insert(User user);
}
